package com.org.model;

/**
 * AttributeOptionId entity. @author MyEclipse Persistence Tools
 */

public class AttributeOptionId implements java.io.Serializable {

	// Fields

	private Attribute attribute;
	private String options;

	// Constructors

	/** default constructor */
	public AttributeOptionId() {
	}

	/** minimal constructor */
	public AttributeOptionId(Attribute attribute) {
		this.attribute = attribute;
	}

	/** full constructor */
	public AttributeOptionId(Attribute attribute, String options) {
		this.attribute = attribute;
		this.options = options;
	}

	// Property accessors

	public Attribute getAttribute() {
		return this.attribute;
	}

	public void setAttribute(Attribute attribute) {
		this.attribute = attribute;
	}

	public String getOptions() {
		return this.options;
	}

	public void setOptions(String options) {
		this.options = options;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof AttributeOptionId))
			return false;
		AttributeOptionId castOther = (AttributeOptionId) other;

		return ((this.getAttribute() == castOther.getAttribute()) || (this
				.getAttribute() != null
				&& castOther.getAttribute() != null && this.getAttribute()
				.equals(castOther.getAttribute())))
				&& ((this.getOptions() == castOther.getOptions()) || (this
						.getOptions() != null
						&& castOther.getOptions() != null && this.getOptions()
						.equals(castOther.getOptions())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getAttribute() == null ? 0 : this.getAttribute().hashCode());
		result = 37 * result
				+ (getOptions() == null ? 0 : this.getOptions().hashCode());
		return result;
	}

}